package com.leyou.gateway.web;

import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class FallbackController {


    @GetMapping("/hystrix/fallback")
    public ResponseEntity<String> fallback(){
        //状态码，内容
        return ResponseEntity.status(HttpStatus.GATEWAY_TIMEOUT).body("网关请求超时");
    }

}
